﻿using System;
using log4net;

namespace VswService_V7.Utility
{
    public class LogHelper
    {
        public static readonly ILog infoLog = LogManager.GetLogger("infoLog");
        public static readonly ILog errorLog = LogManager.GetLogger("errorLog");
        public static void WriteLog(string info)
        {
            if (infoLog.IsInfoEnabled)
            {
                infoLog.Info(info);
            }
        }

        public static void WriteLog(string info, Exception ex)
        {
            if (errorLog.IsErrorEnabled)
            {
                errorLog.Error(info, ex);
            }
        }
    }
}
